package com.pzh.guli.service.vod.controller.api;

import com.aliyuncs.exceptions.ClientException;
import com.pzh.guli.service.base.result.Result;
import com.pzh.guli.service.vod.service.VodVideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/vod/video")
public class ApiVideoController {
    @Autowired
    private VodVideoService vodVideoService;
    @RequestMapping("play/{videoId}")
    public Result getPlayAuth(@PathVariable String videoId) throws ClientException {
        String path=vodVideoService.getPlayAuth(videoId);
        return Result.ok().data("item",path);
    }
}
